Macro5 v2.31
------------

Macro5 is a small but efficient program designed
to enable you to make more effective use of your PDA.
It allows you to define up to 8 hotkeys and 3 panels
of 27 shortcuts for :

   1) Switching directly to applications or documents
   (run them if not started). When you need an info, you don't
   have to bother anymore whether the application is already
   running or not (then having to switch to the shell in order
   to find and start it) : you just key the corresponding
   shortcut and youre in.

   2) Pasting predefined texts (with keywords like %%date%%,
   %%time%%, %%query question_text%%)

   3) Executing macros (all the OPL, some new commands, send
   keys, etc...) for shortcuting all your repetitive tasks
   (e.g. direct access to the battery statistics, automatic link
   between your agenda and your data files, help on a selected
   command in the OPL editor, immediate link on/off, inserting
   new tasks in your agenda, modifying text, restart of your
   programs after a backup with PsiWin, ..., and all the
   small utilities that are not complex enough to make an app
   but you use all the time).

Since hotkeys can be any of the silkscreen keys, you can re-assign
the sensitive keys to run your favorite applications and macros.

For those, like me, who hate to press Ctrl+Shift+Key in order
to access certain Menu functions, (always miss a key and got
the wrong menu or a new character in the document), Macro5
provides a hotkey that will prompt for a key and send
Ctrl+Shift+Key to the current application.

And last but not least, it  enables you to cycle through
tasks (like ctrl-tab on Windows), to display a tasklist,
to run macros at startup & switch on and to manage your
display at switch on (backlight and contrast).


Installation :
--------------
+ Mandatory files
  Copy Macro5.app and Macro5.aif in \System\Apps\Macro5.
  Copy SwtchTsk.opx in \System\OPX.
  Copy all the *.mbm of your country in \System\Apps\Macro5\Icons.
  If your machine is not US/English, German or French, copy the US files
  and rename them according to the captions you read on the screen
  sensitive keys and in the Extras bar.
  You can put the files either on C: or D: but all the files have to
  be on the same disk.
  If you don't already have them, copy Sysram1.opx in \System\OPX
  and install SystInfo.sis as you do with any other SIS file (double
  click on it on you PC or on your Serie5).

+ Optional files
  If you want to install the examples of macros, copy all
  the *.oph, *.opl and *.opo in c:\Macros and Macro5.ini
  in \System\Apps\Macro5. The macros have to be on 'c:' when you
  start Macro5 for the first time, but you can reconfigure it.
  You will then have 6 shortcuts set up as examples, that you may of
  course change or delete.

+ You should have something like :

  c:---+---\Macros---+---Macro.oph
       |             +---*.opl
       |             +---*.opo
       +---\Startup
       |
       +---\System---+---\Apps---\Macro5---+---\Icons---*.mbm
                     |                         +---Macro5.aif
                     |                         +---Macro5.app
                     |                         +---Macro5.ini
                     +---\OPX---+---SwtchTsk.opx
                                +---SysRam1.opx
                                +---SystInfo.opx

+ Then start Macro5 using the Extras bar and that's it.


Upgrade :
---------
+ If you run a version older than 2.25, you cannot upgrade.
  Delete \System\Apps\SwitchTask and follow the above install procedure.
+ If you upgrade from 2.28 or 2.25 :
  Copy the mandatory files as explained above.
  Rename SwitchTask.ini to Macro5.ini.
  Copy Upgrade.opo to \System\Apps\Macro5\ and run it to upgrade Macro5.ini.
  Once it's done, delete Upgrade.opo since you will never use it again.
  !!! Use Upgrade.opo only with SwitchTask v2.25 and 2.28 !!!
+ Otherwise, just copy the mandatory files as explained above.


Usage :
-------

1) You display a TaskList by pressing the TaskList Hotkey (Fn+Del by default).
   You may then switch to the selected task or close it.

2) To cycle through the tasks, hold down Ctrl, browse the applications with
   the Space Bar and release Ctrl when you have found the one your are looking
   for. It works like Ctrl-Tab on Windows. Esc or Del cancels the cycling (notice
   that the  hotkey is defined as Fn+Key, then Fn+Esc will switch off your machine).
   Any other key will cycle backward. Since you do not switch to Macro5 itself
   very often, it does not appear in the cycle. Use the tasklist to access it.

3) You run a shortcut by typing first the Shortcuts Panel Hotkey (Fn+N by default),
   and then the key of the shortcut (26 letters and Space). If you configured Macro5
   for not displaying the shortcuts panels, any non-letter key or any non-assigned
   letter will pop it up.
   You move from one panel to the others with 'Tab' or the arrow keys. 'Esc' will
   cancel the action.
   You can organize the shortcuts in the panels according to their use (e.g. App, Doc,
   Macro or Office, Home, Miscellaneous). You can affect a silkscreen key to one of the
   panel hotkeys and thereby call and run shortcuts with the pen only.
   You can assign the most used shortcuts to hotkeys and run them with a single keystroke.

4) You send Ctrl+Shift+Key by pressing the Ctrl+Shift Hotkey (disabled by default),
   and then the letter corresponding to the Menu function you want to access.
   Any other key than a letter will cancel the action.

5) You can configure Macro5 to set the backlight and the display contrast
   when the machine is switched on. It possible to activate or deactivate the backlight
   and the contrast settings. Parameters are different for the day and the night times.
   Of course, the Night Time has to be greater than the Day Time.

6) It is also possible to define macros that will be run either at switch on (can be
   once a day) or at Macro5 startup.

I have set up by default Fn+Del for the TaskList and Fn+N for the Shortcuts because
they are the same on the different keyboard layouts. But I find more convenient
to use only one modifier (Ctrl) and to affect the hotkeys to non-letter keys around
the right of the Space Bar, like "Ctrl+?" & "Ctrl+," on the US keyboard and
"Ctrl+:" & "Ctrl+;" on the French keyboard. The Ctrl+Shift hotkey is disabled by default.
I have not set a toolbar to keep the program as small as possible.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! I have not included a hotkey to switch back to macro5 because I think it's better !!!
!!! to assign it to a silkscreen key (is set up in the System Control Panel->Extras). !!!
!!! This way the same 'hotkey' allows you to switch back to Macro5 and to restart it  !!!
!!! when it's not running (after a backup).                                           !!!
!!! If you think a regular hotkey would be better please send me your comments.       !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

   App Menu :
   ----------
      + Go to background - Ctrl+B or Esc : send Macro5 to background
      + Exit - Ctrl+E : exit Macro5

   Shortcuts Menu:
   ---------------
      + Modify - Ctrl+M or enter : edit the selected shortcut
      + Move - Ctrl+X : reassign the shortcut to a new key
      + Delete - Ctrl+H or Del : delete the selected shortcut
      + New macro - Ctrl+N : create and open a new source file for a macro
      + Open macro - Ctrl+O : edit the source file of the selected shortcut
      + Record macro - Ctrl+R : record your keystrokes in a new source file

      You select a shortcut either with the arrows or by typing directly the letter of
      the shortcut. You switch from one panel to the others with 'Tab' or the arrows.
      Notice that Enter edit the current shortcut and does not run it.
      Press the Shortcuts hotkey for that. When you create or edit a shortcut,
      you specify first the Caption, which is the label put on the reminding panels,
      and the type of the shortcut. Then you enter the attributes of the shortcut.

      A shortcut may be a :
         + direct access to a document : to be used when the file you want to open is
           a document linked to an application : it has the same icon than its
           application and it may be run by selecting it with the explorer (e.g. Data,
           Word and spreadsheet files).
         + direct access to a program : to be used when the application is not document
           oriented (e.g. Calc, Shell, Time, games, utilities). Notice that you may
           switch to the system by running : "z:\System\Apps\Shell\Shell.app".
         + text to paste : can be any text up to 255 characters, plus the following
           keywords :
              + %%date format%% : insert the current date as specified by format.
                format may a combination of any characters plus :
                  +DD : day of the month (1 to 31)
                  +MM : month (1 to 12)
                  +YY : year on 4 digits
                  +yy : year on 2 digits
                  +DN : full day name
                  +dn : 3-letter day name
                  +MN : full month name
                  +mn : 3-letter month name
                e.g. %%date DD/MM/yy%% pastes 21/12/97
                rem  %%date%% is equivalent to %%date dn DD mn YY%%
              + %%time format%% : insert the current time as specified by format.
                format may a combination of any characters plus :
                  +HH : hours in 24 format
                  +hh : hours in 12 format
                  +MM : minutes
                  +SS : seconds
                  +AP : AM/PM
                e.g. %%time hh:MM:SS AP%% pastes 01:23:45 PM
                rem  %%time%% is equivalent to %%time HH:MM:SS%%
              + %%query question_text%% : open an input box with the label "question_text"
                and paste the input text.
           You can use as many keywords as you want. This way you may prepare small
           documents (e.g. email) that are customized on the spot. This version is
           limited to 255 characters, but by programming a macro with several paste
           commands, you can create large documents. If you ask for it, I will try
           to remove this limit. If you think of some new useful keywords, don't
           hesitate to send me an email. Macro5 is improved through your feedback.
         + macro to execute : look below how to program macros.

      When you record a macro, you are first prompted for its name (must be a new file)
      and for the task you want to work on (you have the option of not recording
      this switch). If you want to switch to the system screen or any other standard
      application, select it in Z:\System\Apps. Then enter your sequence of keys.
      When you are done, stop the recording with the hotkey used for the Shortcuts
      and a program editor will pop up with the code of the macro.
      While recording, do not switch to another task with the application keys or
      the system tasklist, but use the TaskList or TaskCycling hotkeys instead.
      If you loose the blinking message "Recording macro...", get it back
      by switching to Macro5 with the system tasklist.
      The Record Macro facility does not work if Macro.oph is not installed.
      I'm aware that the text cursor is not visible during the record of a macro
      but so far I have not been able to find a workaround.

   Display Menu :
   --------------
      + Zoom in/out - Ctrl+W : zoom in/out the shortcuts panels.
      + Shortcuts panels - Ctrl+Y : if activated, the shortcuts panels will pop up
        each time you press one of the 3 Shortcuts hotkeys. Otherwise they will only
        pop up when pressing a non-letter key or a not assigned key.
 
   Tools Menu :
   ------------
      + Settings - Ctrl+S : define the options for setting the display at switch on.
        The "Turn backlight on when main power" option uses the night contrast setting.
      + Hotkeys ->
         + User defined - Ctrl+U : assign your most used shortcuts to hotkeys.
         + System - Ctrl+V : set the system hotkeys :
            + First Panel : run a shortcut in the first panel
            + Second Panel : run a shortcut in the second panel
            + Third Panel : run a shortcut in the third panel
            + TaskCycling : cycle through open tasks
            + TaskList : display a tasklist
            + Ctrl+Shift : active the Ctrl+Shift capability
        Hotkeys can be any of the silkcreen keys. Use 'Space' to call the list.
        It is possible to disable any hotkey with the key 'Del'.
        !!! Some very rare key combinations may return different keycodes when Caps Lock
        is on or off. If you use your machine in both modes, watch for that (in the
        hotkey setting try the key with and without Caps and check it is the same string).
        Otherwise define your hotkeys with Caps set accordingly but it may happen that
        one of your hotkeys will not work when you are in the other Caps mode.
      + Advanced ->
          + Macro at startup - Ctrl+U : execute the specified macro at Macro5 startup.
            This feature is particularly useful after a backup or a reset, when you have
            to restart all your favorite applications. If you have assigned an Extras bar
            position to Macro5, they may all be restarted with one key stroke.
            You may use the macro "Startup" that runs all the apps & docs
            in \Startup, but it may be anything else (e.g. a sequence of FgApp%:()).
          + Macro at switch on - Ctrl+T : execute the specified macro at switch on.
            Use it to foreground an application at each switch on or when you want
            something to be done or checked regularly. For example you can use the macro
            NoLightOff that disable the backlight timer when the external power is
            connected or you can write a macro that checks the battery status at each
            switch on. You can add the option to run it only once a day.
          + Macro folder - Ctrl+F : define the path of the folder where the macros are
            stored. When you change it, Macro5 ask you to confirm the update
            of the shortcuts paths.
            !!! The system updates the shortcuts paths, but not the code of the macros.
            Some macros may have to be updated as well.
          + Panel captions - Ctrl+J : set the captions of the 3 shortcuts panels.
      + About - Ctrl+A : display information about Macro5.
      + Help - Ctrl+P : remind you the system hotkeys.


Programming of Macros :
-----------------------

Macros are written and compiled with the standard program editor.
The sources should be named *.opl and the binaries *.opo, both stored
in \Macros (may be reconfigured). This naming is not mandatory but
will allow you to access these files directly from Macro5.
The language for the macros is the same than for any other OPL program.
All the EPOC32 OPL & OPX commands are available, plus some new variables,
constants and functions that will help you writing your macros :

   Variables :
   -----------

   + Thread& : + is set at the start of a macro and by FgDoc, UseDoc, FgApp,
                 BgApp, FgSystem and BgSystem.
               + is used by FgCurrent, BgCurrent, TaskUid, TaskApp, TaskDoc,
                 SendKey, SendString, SendPenClick, SendPenUp, SendPenDown, SendPenDrag,
                 Paste, Copy, CopyWord, TaskUid, TaskApp and TaskDoc.
               + is the thread number of the task you want to work with.

   + Macros$ : + path of the folder where macros are stored.
               + e.g. used by the macro Pen to load the bitmap of the cursor.
               !!! do not modify it otherwise the file input boxes will not point
                   to the correct folder anymore.

   Commands :
   ----------

      + FgDoc%:(Doc$)
         => + foreground the document Doc$ if in memory and open it otherwise.
            + use it only with documents bound to applications (have the same icon
              than their application and may be run by selecting them with the explorer).
	    + set Thread& to the corresponding ThreadId.
	    + return 0 if Doc$ was in memory and 1 if it has to be loaded.

      + UseDoc%:(App$,Doc$,Cmd%)
         => + switch to the document Doc$ if in memory and Cmd% < 3,
              set Thread& to the corresponding ThreadId if in memory and Cmd% = 3,
              and start App$ otherwise.
            + Cmd%=0 for open, 1 for create, 2 for run and 3 for run in background.
              Notice that the standard applications do not open Doc$ but the last
              document when they are opened with Cmd%=3.
            + set Thread& to the corresponding ThreadId.
            + return 0 if Doc$ was in memory and 1 if it has to be loaded.

      + FgApp%:(App$)
         => + foreground the program App$ if in memory and run it otherwise.
            + handle app, opo and application bound documents as well, but prefer
              FgDoc when you know it is a document (is faster).
            + set Thread& to the corresponding ThreadId.
            + return 0 if App$ was in memory and 1 if it has to be run.

      + BgApp%:(App$)
         => + set Thread& to the corresponding ThreadId if in memory and run it
              in the background otherwise. To be used when you want to send information
              (SendKeyCode, Copy$, Paste) to an application but you don't want it
              to be in the foreground yet (is faster).
            + handle only programs (app & opo), not documents.
            + set Thread& to the corresponding ThreadId.
            + return 0 if App$ was in memory and 1 if it has to be run.

      + FgSystem:
         => + foreground System.
            + set Thread& to the corresponding ThreadId.

      + BgSystem:
         => + set Thread& to the ThreadId of System.

      + FgCurrent:
         => + foreground the task with the ThreadId Thread&.
         !!!! make sure that Thread& points to the correct task.

      + BgCurrent:
         => + background the task with the ThreadId Thread&.
         !!!! make sure that Thread& points to the correct task.

      + FgMacro:(Mac$)
         => + execute the macro Mac$
         !!!! Thread& keeps its current value.
         !!!! you may not exceed 5 levels of macros calling other macros

      + FgSound:(Sound$,Volume%)
         => + play the file Sound$, waiting for the end of the file before going on.
            + 0 (no volume) =< Volume% =< 4 (maximum volume).

      + BgSound:(Sound$,Volume%)
         => + play the file Sound$, going on without waiting the end of the file.
            + 0 (no volume) =< Volume% =< 4 (maximum volume).

      + GetFocus:
         => + when any Bgxxx commands is used, the corresponding task is foregrounded
              and the macro is sent to the background. As a result all displays are now
              in the background as well and all events redirected to the current task.
              GetFocus return the focus on the macro when you need to display information
              or input data.
          !!! Thread& keeps its current value.

      + ReleaseFocus:
         => + return the focus to the current task.
            + you may use FgCurrent (or any Fgxxx) as well.
         !!!! Thread& keeps its current value.

      + CloseApp%:(App$)
         => + ask the application or document App$ to close (data are saved).
            + return 1 if App$ was running and 0 otherwise.
         !!!! if the application is not programmed to respond to closing events,
              it will not go down.

      + KillApp%:(App$)
         => + kill the application or document App$ (data are not saved).
            + return 1 if App$ was running and 0 otherwise.
         !!!! ALL DATA UPDATES IN THE APPLICATION MAY BE LOST !!!!

      + GetThread&:(App$)
         => + return the thread ID of App$ if it is running and 0 otherwise.

      + GetApp$:(UID&)
         => + return the full path of the program identified by UID.

      + TaskUid&:
         => + return the program's UID pointed by Thread&.
         !!!! make sure that Thread& points to the correct task.

      + TaskApp$:
         => + return the program's name pointed by Thread&.
         !!!! make sure that Thread& points to the correct task.

      + TaskDoc$:
         => + return the path of the document used by the program pointed by Thread&.
              return "" if the program does not use any document or has not declared it.
         !!!! make sure that Thread& points to the correct task.

      + Copy$:
         => + copy the selected text in the clipboard and return it.
            + if the text is greater than 255 characters, only the first 255 are copied.
         !!!! if no text is selected, Copy$ returns "".
         !!!! make sure that Thread& points to the correct task.

      + CopyWord$:(CharList$):
         => + copy the word around the cursor in the clipboard and return it.
            + CharList$ is not case sensistive and lists the allowed characters in
              the word. The selection is stopped ss soon as a not allowed character is found.
              e.g. for : + a standard word, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ-"
                         + a procedure name, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_%&$:"
                         + an URL, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_:\."
                         + a number, use "0123456789.,"
         !!!! Space or Tab CANNOT be allowed and always stop the selection.
         !!!! make sure that Thread& points to the correct task.

      + Paste:(Text$)
         => + put Text$ in the clipboard and paste it.
            + the keywords %%date%%, %%time and %%query question_text%% may be used.
         !!!! this command works only when the target task supports it.
         !!!! make sure that Thread& points to the correct task.

      + ClipLen&:
         => + return the length of the text in the clipboard

      + ClipRead:(BufferAddr&,Max&)
         => + put in Buffer the text in the clipboard, with a limit of Max& Characters.
         !!!! Max& has to be a long integer. If you use a constant, either do it in hexa
              and put '&' before or include "Macro.oph" for the OPL compiler to coerce
              the parameters types.
         !!!! make sure that Buffer is large enough to store Max& characters.
         !!!! if you want to read the selected text,
              use "SendKeyCode:(Ctl%+%c,Ctrl%,1) :Pause 5" before.

      + ClipWrite&:(BufferAddr&)
         => + put in the clipboard the text in Buffer.
         !!!! if you want to paste the text in the current task,
              use SendkeyCode:(Ctl%+%v,Ctrl%,1) after.

      + SendPenClick:(x%,y%)
         => + emulate a click of the pen at x%,xy%.
         !!!! make sure that Thread& points to the correct task.
         !!!! this command foregrounds the corresponding task.
        
      + SendPenDown:(x%,y%)
         => + emulate a pen going down at x%,xy%.
         !!!! make sure that Thread& points to the correct task.
         !!!! this command foregrounds the corresponding task.

      + SendPenUp:(x%,y%)
         => + emulate a pen going up at x%,xy%.
         !!!! make sure that Thread& points to the correct task.
         !!!! this command foregrounds the corresponding task.

      + SendPenDrag:(x%,y%)
         => + emulate a dragging of the pen to x%,xy%.
         !!!! make sure that Thread& points to the correct task.
         !!!! this command foregrounds the corresponding task.
        
      + SendKey:(KeyStr$)
         => + send the corresponding key sequence to the task pointed by Thread&.
            + the keywords are : Sh or Shift, Ct or Ctrl, Fn, Del, Tab, Enter,
                                 Space, Esc, Menu, Up, Down, Right and Left.
              they are not case sensitive (letters are).

            + e.g. to send: Ctrl+Fn+Left, Ctrl+Shift+Fn+Right, Ctrl+c (copy the whole text)
                   use:     SendKey:("Ct+Fn+Left,Ct+Sh+Fn+Right,Ct+c")   

                   to send: Hello,[Enter]How are you ?
                   use:     SendKey:("H,e,l,l,o,,,Enter,H,o,w, ,a,r,e, ,y,o,u, ,?")
                   rem:     in this case, Paste:("Hello,"+Chr$(6)+"How are you ?")
                            would be faster.

         !!!! make sure that Thread& points to the correct task.
         !!!! KeyStr$ is limited to 255 characters. Use several SendKey if you need more.

      + SendString:(String$)
         => + send String$ to the task pointed by Thread&
            + to be used instead of Paste: when String$ is short or when the target application
              does not support the copy/paste functions.
         !!!! make sure that Thread& points to the correct task.
         !!!! keywords like %%date%% %%time and %%query%% are not supported by SendString.

      + KeyString$:(Key&,Mod&)
         => + return the caption of the key defined by ev&(1) and ev&(4) in GetEvent32.

      + KeyMod&:(EvMod&)
         => + translate the Modifiers Code returned by GetEvent32 in ev&(4).
              to the Modifers Code used by SendKeyCode and CaptureKey.

      + gClip:(Text$)
         => + same as Busy, but does not blink.
         !!!! make sure you've got the focus, otherwise nothing will appear.
         !!!! if you make some graphical operations (e.g. gPrint, gLine, ...) between gClip:()
              and gClipOff, insert a command 'gUse' after each gClip:() in order to switch back
              to the windows you're working on.

      + gClipOff:
         => + same as Busy Off but for gClip.

      + OPLCreate:(HdlAddr&,Files$)
         => + create the OPL file Files$ with the handler Hdl%.
         !!!! needs Macro.oph.

      + OPLWrite:(Hdl%,Text$)
         => + write Text$ in the OPL file handled by Hdl%.

      + OPLClose:(Hdl%)
         => + close the OPL file handled by Hdl%.

      + Beep:
         => + sound a nice beep.

Notice that a macro is seen as a part of Macro5 (that's why you are able to
access some global variables and new functions) and consequently, as long as the
macro is running, Macro5 is not available for an other switch or lighting up
the display at switch on. The purpose of a macro is to automate straight tasks.
If you think of something more complex, then program an app and define a shortcut
to run it. Do not use macros to access Macro5 : because Macro5 is busy executing
the macro, it will not react to the sent events.
You may not program Macro5 to switch to itself.
If you think of new functions that would help writing macros, please send me an email.
And if you write useful macros, please think that it may benefit to others.
Either publish them on the web or send them to me and I will upload them on my site.
I have included some examples as a tutorial :

   + Battery : display the battery statistics : show you how to send keys to an App (*).
   + LinkOn : set on the link : show you how to send keys to an App (*).
   + LinkOff : set off the link : show you how to send keys to an App (*).
   + DataLink : show you how to set a link between an App and a data file.
   + OPLHelp : display the usage of a keyword you've selected in the OPL Editor (+).
   + FileTime : change the time stamp of a file : show you how to use OPL in a macro.
   + UpperCase : set to uppercase the text you've selected : show you how to handle
                 the clipboard functions.
   + RunExtras : run applications in the Extras bar without the pen.
   + RunMacro : run not assigned macros.
   + Startup : start all the App/Doc in c:\Startup. Very useful after a backup
               with PsiWin or a reset. Can be used with Shortcut.app or XtraLink.app.
   + NoLightOff : disable the backlight timer when the main power is present. To be
                  used as a 'Run macro at switch on'.
   + BatStat : display a graphical status of the main batteries for 2 seconds.
               to be used as a 'Run macro at switch on'
   + BatStatLow : same as BatStat but display the status only when the batteries are low.
   + Pen : emulate the pen with the keyboard : no more using of the back of your
           fingernails :

              + arrows => move the cursor
              + space => click
              + ctrl+arrows => drag (ctrl down, move, ctrl up)
              + shift+space => space
              + shift+arrows => arrows
              + shift+esc => quit
              + any other key => key

   (*) : these macros have been written for the US/UK, German and French Serie 5.
         The key sequences must be adapted if your machine is from another country.
   (+) : you need the "OPL reference" database file.

Please have a look at them before writing your own procedures. I hope they cover
all the new commands. If you have any questions, please feel free to contact me
and I will do my best to reply you as soon as possible. Because you can do almost
anything with macros, you should watch what you are doing and backup your data.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! If you get the error message 'ppp procedure not found' where ppp is one   !!!
!!! of the macro functions (BgSystem, FgCurrent, ...), it means either that   !!!
!!! you did not select the type "macro" in the shortcut definition, or you're !!!
!!! trying to run the macro directly from the program editor or the system.   !!!
!!! A macro cannot be run directly after a translation or by selecting it     !!!
!!! in the explorer, but must be executed through a shortcut in Macro5.       !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Planned enhancements :
----------------------
+ %%city%% and %%country%% if you ask for it
+ running of macro/app/doc at specified times (e.g. automatic backups on CF)
+ night clock
+ full online help

Vote for them. If you wish something else, then send me an email.
And once again, if you write some useful macros, send them to
me or publish them so that others may use them.


Known issues :
--------------
+ When you press tab in a file select box and the directory is system,
  the app crashes. It seems to be an EPOC32 bug and I can't do anything about it.
+ When Macro5 is busy doing something (opened dialog or menu,
  running macro), neither the hotkeys or the display settings works.
  Consequently, do not keep open a dialog box and write straight macros.
+ The text cursor is not visible when a macro is being recorded. So far I have not
  been able to find a workaround.
+ Macro5 is not restarted after a backup by PsiWin. This is a known bug of PsiWin
  that will only restart the applications in the ROM (Z:).


History :
---------
+ v1.00 : + first public release
+ v1.10 : + added the cycling through tasks
          + changed the default values for the hotkeys
+ v1.11 : + excluded Macro5 from the cycle
+ v2.00 : + added 26 shortcuts for running app/doc, ClipLibrary and macros
          + improve the hotkey setting interface
          + removed the blinking when cycling through tasks
          + moved the init file from \System\Data to \Data\SwichTask\Data
          + official UID from Psion
+ v2.10 : + added the Ctrl+Shift hotkey
          + added the option of not displaying the shorcuts panel
          + added the possibility to disable each hotkey
          + set Thread& automatically at the start of a macro, removed SetCurrent
          + FgApp now runs documents as well as app and opo.
          + added the functions TaskUid, TaskApp, TaskDoc KeyString and KeyMod
          + removed some variables and put them as constants in Macro.oph
          + rewrote all the macros, added the macro Startup
          + added the handling of Caps Lock in the hotkey setting
          + few bugs corrected
+ v2.15 : + added the option to run a macro at startup
          + added the option to set backlight "on" when external power is connected
          + added the variable Home$ and the functions FgMacro, ClipLen&, ClipRead and ClipWrite
          + added the declaration of the macro functions in Macro.oph
          + hotkeys, shortcuts and ctrl+shifts callings are not sensitive to Caps Lock anymore
          + SendKeyCode now works when Nb% > 1
          + fixed a problem with KeyMod ; letters are now in lowercases in KeyString
+ v2.20 : + added the backward cycling
          + added the Shortcuts Panel zooming
          + added the Record Macro facility
          + the format of %%date%% and %%time%% is now fully configurable
          + added the functions FgSound, BgSound and Beep
          + removed FgMacro : a macro cannot run an other macro because they've got the same name
          + adapted the display to the Geofox One
          + fixed a problem with Copy$ that could return nothing even when a text was selected
+ v2.25 : + the task cycling bar now includes the application icons
          + added the option to run a macro at switch on
          + moved Macro5.ini to \System\Apps\Macro5
          + added the possibility to change the path of the macros folder, removed Home$, added Macro$
          + added commands OPLCreate, OPLWrite and OPLClose.
          + new macros RunExtras and NoLightOff included, macro Startup updated
          + fixed bug with %%date dn%% and %%date DN%
          + fixed bug with TaskApp$ returning too many characters
+ v2.28 : + new commmands to emulate the pen : SendPenClick, SendPenUp, SendPenDown and SendPenDrag
          + new much more easy to use SendKey command
          + rewrote the 'Record macro' facility to use the new command SendKey
          + added the option 'Only once a day' in the 'Run macro at switch on' facility
          + enhanced the handling of *.hlp files and documents created by OPL applications
          + added the macro Pen that emulates the stylus with the keyboard
+ v2.30 : + renamed SwitchTask to Macro5
          + added 3 panels of 27 shortcuts
          + added 8 user defined hotkeys
          + added the possibility for hotkeys to be silkscreen keys
          + by popular request made all windows pen sensitive
          + improved the handling of asynchroneous sounds in BgSound
          + added the functions CopyWord$, SendString, GetThread&, GetApp$, CloseApp% and KillApp%
          + rewrote all the macros, added the macros BatStat and BatStatLow
+ v2.31 : + removed the restriction on the name of the main proc in macros
          + added the function FgMacro:(Mac$)
          + added the macro RunMacro
          + fixed the bug that skipped the running of macros at switch on when the main power was present


Copyright :
-----------
This program has been written by Pascal NICOLAS. It may be distributed
freely as long as it is not altered or sold. This program is a SmileWare,
which means that if you use it, you "MUST" send me a :-)
Even if you did it for a previous release, please tell me how you find
this new version : I do love :-) very much. I will then notify you of
the new releases.

At this point, many many thanks and :-) to MattM who helps me a lot in the
enhancement of Macro5.

And thank you to all of you who send me comments, new ideas, :-) and encourages
me to go on.

Pascal NICOLAS
Email : pnicolas@geocities.com
Latest version and a huge library of macros at http://www.geocities.com/SiliconValley/Pines/1215